﻿using Bot.Domain.Entities;
using Comm100.Framework;
using Comm100.Framework.AutoMapper;
using Comm100.Public;
using Bot.Domain.Bo;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using Bot.Domain;
using Bot.Domain.Enum;

namespace Bot.Application.Dto
{
    [AutoMapTo(typeof(ChatbotUpdateBo))]
    public class ChatbotUpdateDto
    {
        [Required]
        public Guid Id { get; set; }
        [Required]
        public int SiteId { get; set; }
        [Required]
        [MaxLength(ChatbotStringLength.MaxLength_Language)]
        public string Language { get; set; }
        [Required]
        public string EngineType { get; set; }
        public Guid? AvatarId { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_DialogFlowProjectId)]
        public string DialogFlowProjectId { get; set; }
        [Required]
        [MaxLength(ChatbotStringLength.MaxLength_Name)]
        public string Name { get; set; }
        public Guid? ThirdPartyWebhookId { get; set; }
        [Required]
        public bool IsTrained { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_MessageWhenNotHelpful)]
        public string MessageWhenNotHelpful { get; set; }
        public bool? IfIncludeContactAgentOptionWhenNotHelpful { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_MessageWhenProvidingPossibleAnswer)]
        public string MessageWhenProvidingPossibleAnswer { get; set; }
        public int? ConsecutiveTimesOfPossibleAnswers { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_MessageAfterVisitorChooseToContactAgent)]
        public string MessageAfterVisitorChooseToContactAgent { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_ContactAgentButtonTextWhenOnline)]
        public string ContactAgentButtonTextWhenOnline { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_ContactAgentButtonTextWhenOffline)]
        public string ContactAgentButtonTextWhenOffline { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_FormSubmitButtonText)]
        public string FormSubmitButtonText { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_FormCancelButtonText)]
        public string FormCancelButtonText { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_FormConfirmButtonText)]
        public string FormConfirmButtonText { get; set; }
        public decimal? HighConfidenceScore { get; set; }
        public decimal? NoAnswerScore { get; set; }
        [Required]
        public DateTime LastUpdatedTime { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_OwnBotConfig)]
        public string OwnBotConfig { get; set; }
        [Required]
        public bool IsDeleted { get; set; }

        public virtual ImageUpdateDto Avatar { get; set; }
        public virtual List<GreetingMessageInChannelUpdateDto> GreetingMessageInChannels { get; set; }
        public virtual List<NoAnswerMessageInChannelUpdateDto> NoAnswerMessageInChannels { get; set; }
        public virtual List<MessageAfterSeveralConsecutivePossibleAnswersInChannelUpdateDto> MessageAfterSeveralConsecutivePossibleAnswersInChannels { get; set; }
        public virtual WebhookUpdateDto ThirdPartyWebhook { get; set; }

    }
}